import request from '@/utils/request'

// 获取订单列表
export function getOrderList() {
    return request({
        url: '/mobile/order/list',
        method: 'get'
    })
}

//接受订单
export function acceptOrder(orderId){
    return request({
        url: `/mobile/order/accept/${orderId}`,
        method: 'put'
    })
}

// 我的维修单
export const getInProgressList = () => {
    return request({
        url: '/mobile/order/in-progress/me',
        method: 'get'
    })
}

// 完成订单
export const completeOrder = (orderId) => {
    return request({
        url: `/mobile/order/complete/${orderId}`,
        method: 'put'
    })
}

// 转单
export const transferOrder = (orderId) => {
    return request({
        url: `/mobile/order/transfer/${orderId}`,
        method: 'put'
    })
}
